#ifndef TIMING_H
#define TIMING_H

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include "node.h"

//---------------------------------------------------------------------------

typedef struct __PinDleay
{
				double raising[5];
				double falling[5];	
} PinDelay;

typedef struct __GateDelay
{
				int pinCount;
				PinDelay PD[3];
	
} GateDelay;

class Model 
{
	
public:
				Model ();
	
				GateDelay GD[9];
				
};


class Timing
{

public:
				Model * model;
				Node  ** nodeArray;
				int   nodeIndex;
	
				Timing ();
				
				
				void MarkCriticalFF (double k);
				void CountCriticalPathFF (double k);
				
				double GetMaxAT ();
				double GetAT (Node * nodeTarget);
				void GetRATALL (double thresholdAT);
				void GetRAT (Node * nodeTarget);
				double GetRAT_CalculateDelay (Signal * signalP, Node * nodeQ); 
				int GetCPathCount (Node * nodeTarget);
				double GetPinDelay (Signal * signalP, Node * nodeQ); 
};
//---------------------------------------------------------------------------
extern Timing * timing;
#endif

